package com.negative.data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.text.format.DateFormat;


@SuppressWarnings("serial")
public class SubEventItem implements Serializable{

	private long id;
	private long eventID;
	private String name;
	private Date start_time;
	private Date end_time;
	
	private SubEventItem(long id, long eventID, String name, Date start_time,
			Date end_time) {
		this.id = id;
		this.eventID = eventID;
		this.name = name;
		this.start_time = start_time;
		this.end_time = end_time;
	}
	
	public static SubEventItem CreateSubEventItem(long id, long eventID, String name, Date start_time,
			Date end_time) {
		
		if(start_time == null || (end_time != null && end_time.before(start_time) == true))
		{
			return null;
		}
		return new SubEventItem(id, eventID, name, start_time, end_time);
	}

	public long getId() {
		return id;
	}

	public long getEventID() {
		return eventID;
	}

	public String getName() {
		return name;
	}

	public Date getStart_time() {
		return start_time;
	}

	public Date getEnd_time() {
		return end_time;
	}

	
	
}
